package com.agile.leetcode.pic;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.Base64;

/**
 * @author chenzhangkun
 * @ClassName ImageToBase64
 * @description: TODO
 * @date 2024年10月25日
 */
public class ImageToBase64 {
	public static void main(String[] args) throws IOException {
		byte[] bytes = Files.readAllBytes(Paths.get("C:\\Users\\yineng\\Pictures\\Saved Pictures\\1.png"));
		String base64Image = Base64.getEncoder().encodeToString(bytes);
		System.out.println(base64Image);

	}
}
